<div class="boxDlg300" >
	<div class="headerTitle">
    	<h3>Tặng VON - {$objUser->fullnamevn}</h3>
        <span><a href="javascript:closeUI();"><img src="{$smarty.const.HOST_STATICS}img/btn/close.png" width="10" height="10" alt="Close dialog" border="0"/></a></span>
    </div>
    <div class="dlg300Item">  
    	<div class="giveVon">
        	<form method="post" name="frmGiveVon" id="frmGiveVon" action="{$smarty.const.HOST_VFRIEND}request/givevon" enctype="multipart/form-data" autocomplete="off">
            	<input type="hidden" name="puserid" id="puserid" value="{$objUser->id|base64E}" />
                <input type="hidden" name="pfullname" id="pfullname" value="{$objUser->fullnamevn}"/>
                <input type="hidden" name="ptoken" id="ptoken" value="{$strTok|secret:"giveVon"}"/>
                <input type="hidden" name="pvon" id="pvon" value="0" />
                <div class="userInput">
                    <label>VON hiện tại:</label>
                    <strong>{$intVon|number_format:"0":",":"."}</strong>
                </div>
                <div class="userInput">
                    <label>VON gửi tặng:</label>
                    <input type="text" name="pvon_i" id="pvon_i" onkeypress="javascript: return isNumberKey(event);" onkeyup="javascript:addPointer(this,event);" maxlength="8"/>
                </div>
                <div class="sAction">
                    <input type="submit" value="Gửi" class="btn" />
                    <input type="button" value="Hủy" class="btnCancel" onclick="javascript:closeUI();" />
                </div>
            </form>
        </div>  	
    </div>
</div>
<script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/language/common.js?{$smarty.const.JS_UPDATE}"></script>
{literal}
	<script type="text/javascript" language="javascript">
    	$(document).ready(function(){
			$("#frmGiveVon").validate({
				errorClass		: "errorMessage",
				errorElement	: "span",
				onfocusout		: false,
				onkeyup			: false,
				rules: {
					pvon_i:{
						required	: true
					}
				},
				messages: {			
					pvon_i:{
						required	: give_von_required
					}
				},
				errorPlacement: function(label, element) {
					var id = element.attr("id");	
					label.insertAfter($("#" + id));			
					
				},
				submitHandler: function(form) {		
					strVon = $("#pvon_i").val();		
					$("#pvon").val(replaceAll(strVon,".",""));
					form.submit();
				}			 
			});	
		});
    </script>
{/literal}